/**
 * @description 统一输出的地方
 */
const getters = {
  sidebar: (state) => state.app.sidebar,
  size: (state) => state.app.size,
  device: (state) => state.app.device,
  visitedViews: (state) => state.tagsView.visitedViews,
  cachedViews: (state) => state.tagsView.cachedViews,
  token: (state) => state.user.token,
  tokenHead: (state) => state.user.tokenHead,
  tokenType: (state) => state.user.tokenType,
  avatar: (state) => state.user.avatar,
  name: (state) => state.user.name,
  permissions: (state) => (key) => {
    return state.user.permissions.includes(key)
  },
  // permissions: state => state.user.permissions,
  introduction: (state) => state.user.introduction,
  roles: (state) => state.user.roles,
  remoteRoutes: (state) => state.permission.remoteRoutes,
  fetchMenu: (state) => state.permission.fetchMenuCount,
  permission_routes: (state) => state.permission.menuRoutes,
  errorLogs: (state) => state.errorLog.logs
}
export default getters
